package work.jame.blog.mapper;

import org.apache.ibatis.annotations.Param;
import work.jame.blog.pojo.Authority;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Jame
 * @since 2023-05-10
 */
public interface AuthorityMapper extends BaseMapper<Authority> {


    /**
     * 根据用户id 查询该用户拥有的所有权限码
     * @param userId 用户id
     * @return 权限码集合
     */
    Set<String> queryAuthorityCodeByUserId(@Param("userId") Long userId);

}
